#ifndef _DKGL_VIEWVOLUME_H_
#define _DKGL_VIEWVOLUME_H_

#include "dkglPreRequest.h"
#include "dkglRect2D.h"

namespace DKGL
{

// forward declaratoin
class PersViewVolume;

class ViewVolume
{
public:
	ViewVolume(){};
	ViewVolume(const dbRect2D& np, double nearDist, double farDist)
		: mNearClipPlane(np),mNear(nearDist), mFar(farDist){};

	virtual void draw() = 0;
	virtual void setProjection() = 0;
	virtual void onSize(double aspectRatio) = 0;

protected:
	dbRect2D mNearClipPlane;
	double mNear, mFar;
	float  mProjMatrix[16];
};

class OrthoViewVolume : public ViewVolume
{
public:
	OrthoViewVolume();
	OrthoViewVolume(const dbRect2D& np,double nearDist, double farDist);
	OrthoViewVolume(const OrthoViewVolume&);	
	OrthoViewVolume(const PersViewVolume&);

	virtual void draw(){};
	virtual void setProjection();
	virtual void onSize(double aspectRatio){};

private:

	void _updateProjMatrix();


};

class PersViewVolume : public ViewVolume
{

};
}
#endif